package cn.hongwei.controller.api;

import cn.hongwei.result.R;
import cn.hongwei.service.AdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 *
 * @author Great
 * @email 1224028994@qq.com
 */
@RestController
@CrossOrigin
@RequestMapping("/api/cms/ad")
public class ApiAdController {
    @Autowired
    AdService adService;
    //处理用户首页查询广告集合请求
    @GetMapping("list")
    public R listAds(){
        Map map = adService.listAds();
        return R.ok().data(map);
    }
}

